package com.haha.community.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.haha.community.entity.DiscussPost;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Yang
 * @since 2020-10-30
 */
public interface DiscussPostMapper extends BaseMapper<DiscussPost> {

    /**
     * 使用MybatisPlus的查询条件
     */
    List<DiscussPost> selectByPage(@Param(Constants.WRAPPER) QueryWrapper<DiscussPost> queryWrapper, int offset, int limit);

    void increaseCountById(Integer entityId, int i);
}
